package com.itheima.d4_print_stream;

import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.io.PrintWriter;

/**
 * 目标：掌握打印流：PrintStream/PrintWriter的用法。
 * 使用方法一样，区别在于：
 *      PrintStream print/println方法自带刷新
 *      PrintWriter print/println方法不刷新
 *
 *
 */
public class PrintTest1 {
    public static void main(String[] args) throws FileNotFoundException {
        final PrintStream ps = new PrintStream("day10io-app2/file/咏鹅.txt");

        ps.println("樊凯真帅");

        final PrintWriter pw = new PrintWriter("day10io-app2/file/咏鹅.txt");

        pw.println("樊凯真屌");
        pw.flush();
    }
}
